package com.china.bike.dao.impl;

import com.china.bike.dao.UserDao;
import com.china.bike.entity.BikeRepairRecord;
import com.china.bike.entity.BikeUseRecord;
import com.china.bike.entity.User;
import com.china.bike.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class UserDaoImpl implements UserDao {

    @Autowired
    private UserMapper userMapper;

    @Override
    public void createUser(User user) {
        userMapper.createUser(user);
    }

    @Override
    public User searchUserByCondition(User user) {
        return userMapper.searchUserByCondition(user);
    }

    @Override
    public List<BikeUseRecord> searchUserJourney(User user) {
        return userMapper.searchUserJourney(user);
    }

    @Override
    public List<BikeRepairRecord> searchBikeRepairRecord(User user) {
        return userMapper.searchBikeRepairRecord(user);
    }
}
